#include "VSCaptureTexAllState.h"
#include "VSResourceManager.h"
#include "VSImage.h"
#include "VSGraphicInclude.h"
#include "VSSceneManager.h"
using namespace VSEngine2;
IMPLEMENT_RTTI(VSCaptureTexAllState,VSTexAllState)
BEGIN_ADD_PROPERTY(VSCaptureTexAllState,VSTexAllState)
END_ADD_PROPERTY
IMPLEMENT_INITIAL_BEGIN(VSCaptureTexAllState)
IMPLEMENT_INITIAL_END

VSCaptureTexAllState::VSCaptureTexAllState()
{

}
VSCaptureTexAllState::~VSCaptureTexAllState()
{

}
void VSCaptureTexAllState::SetViewCapture(const VSString & ViewCaptureName)
{
	VSViewFamily *pCaptureViewFamily = VSSceneManager::ms_pSceneManager->GetViewFamily(ViewCaptureName);
	VSMAC_ASSERT(pCaptureViewFamily)

		VSRenderTarget * pRenderTarget = pCaptureViewFamily->GetFinalColorRT();
	VSMAC_ASSERT(pRenderTarget);


	VSTexture * pTexture =  pRenderTarget->GetCreateBy();

	VSMAC_ASSERT(pTexture);

	m_pTex = pTexture;
}